// ，路由模块抽离：需要注意路径问题。以下为标准写法
// 注意：是从当前路径下的/home找文件  当前路径即src
import VueRouter from 'vue-router'
import goodDetails from './goods/details.vue'
import home from './home/home.vue'
import userlogin from './login/login.vue';
import register from './login/register.vue';
import userinfos from './user/userinfos.vue';
import fav from './user/fav.vue';
import order from './user/order.vue';
import shopcar from './user/shopcar.vue';
var router = new VueRouter({
    ///mode: 'history',  // 默认模式  hash 
    routes: [
        {
            path: '',
            redirect: { name: 'home' },
            meta: { keepAlive: false }
        },
        {
            path: '/home',
            component: home,
            name: 'home',
            meta: { keepAlive: false }
        },
        {
            path: '/details',
            component: goodDetails,
            name: "gooddetails",
            meta: { keepAlive: false }
        },
        {
            path: '/login',
            component: userlogin,
            name: "login",
            meta: { keepAlive: false }
        },
        {
            path: '/register',
            component: register,
            name: "register",
            meta: { keepAlive: false }
        },
        {
            path: '/userinfos',
            component: userinfos,
            name: "userinfos",
            meta: { keepAlive: false }
        },
        {
            path: '/fav',
            component: fav,
            name: "fav",
            meta: { keepAlive: false }
        },
        {
            path: '/order',
            component: order,
            name: "order",
            meta: { keepAlive: false }
        },
        {
            path: '/shopcar',
            component: shopcar,
            name: "shopcar",
            meta: { keepAlive: false }
        },


    ]
})

export default router
